Explanation:

texCoordIndex refers to the points of the TextureCoordinates as they are ordered, 0 to N. These are ordered counter-clockwise about the face they make up.

If you refer to either diagram of the octagon to left, you see the points that make up the octagon are ordered 0 to 7, counter-clockwise. Looking at the scorce code, you see there are eight points (0 to 7).